import { notFound } from 'next/navigation'; import Image from 'next/image'; import { fetchJson } from '@/lib/utils/server'; import type { GameDetailResponse } from '@/types/response/store/game'; import GameMediaGallery from './GameMediaGallery'; import GameProductCarousel from './GameProductCarousel'; export async function generateMetadata({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const res = await fetchJson(`/api/store/games/${id}`, { method: 'GET' }); return { title: res.success && res.data ? res.data.korName : '게임' }; } export default async function GameDetailPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const res = await fetchJson(`/api/store/games/${id}`, { method: 'GET' }); if (!res.success || !res.data) { notFound(); } const game = res.data; return (

{game.korName}

{game.engName &&

{game.engName}

}
{/* 좌측: 미디어 갤러리 + 상품 + 설명 */}
{game.description && (

게임 소개

)}
{/* 우측: 정보 사이드바 */}
); }